package com.navid.trafalgar.model.opengl2;

import com.jme3.math.Vector3f;
import com.jme3.post.Filter;
import com.jme3.post.filters.BloomFilter;
import com.jme3.scene.Node;
import com.jme3.texture.Texture2D;
import com.jme3.water.WaterFilter;
import com.navid.trafalgar.model.ASimpleWater;
import java.util.Collection;

/**
 *
 * @author alberto
 */
public class SimpleWater extends ASimpleWater {

    private WaterFilter water;
    
    public SimpleWater(Node rootNode, Vector3f lightDir, Collection<Filter> filterCollection) {

        water = new WaterFilter(rootNode, lightDir);
        water.setWaveScale(0.003f);
        water.setMaxAmplitude(2f);
        water.setFoamExistence(new Vector3f(1f, 4, 0.5f));
        water.setNormalScale(0.5f);
        water.setRefractionConstant(0.25f);
        water.setRefractionStrength(0.2f);
        water.setFoamHardness(0.6f);
        
        filterCollection.add(water);

        BloomFilter bloom = new BloomFilter();
        bloom.setExposurePower(55);
        bloom.setBloomIntensity(1.0f);
        filterCollection.add(bloom);
        
    }

    public void setWaterHeight(float waterHeight) {
        //     water.setWaterHeight(waterHeight);
    }

    public void setWaterTexture(Texture2D texture) {
//        water.setFoamTexture(texture);
    }

    public float getHeight() {
        return 0;
    }
}
